import request from "@/utils/request"
import { AxiosProgressEvent } from "axios"

export const uploadFile = (data: any, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void) => {
    return request({
        url: '/node-api/file/upload',
        method: 'post',
        data,
        onUploadProgress
    })
}
export const uploadFileChunk = (data: any) => {
    return request({
        url: '/node-api/file/chunk',
        method: 'post',
        data
    })
}
export const uploadFileChunkFinally = (data: any) => {
    return request({
        url: '/node-api/file/chunk-finally',
        method: 'post',
        data
    })
}